Disable callbacks when extension is disabled#661
Conversation
akx
left a comment
There was a problem hiding this comment.
I'd probably call the variable script_protocol just script for brevity – or maybe both the type name and the variable should be e.g. SDDPScript and sddp?
|
and keep the module name the same? |
29d47bc to
5ef7740
Compare
|
Now that I think of it, I'm not sure the protocol is actually required at all – couldn't we just use the actual script object as a type (guarded against circular imports)? |
Happy to do that too. I'll make the change. |
Ensure that callbacks (apart from settings and wildcards manager), only run when dynamic prompts is enabled. This builds on #648
5ef7740 to
6b5016c
Compare
akx
left a comment
There was a problem hiding this comment.
Probably one mis-import there?
| from sd_dynamic_prompts.wildcards_tab import initialize as initialize_wildcards_tab | ||
|
|
||
| if TYPE_CHECKING: | ||
| from sd_dynamic_prompts.sddp_script import SDDPScript |
There was a problem hiding this comment.
| from sd_dynamic_prompts.sddp_script import SDDPScript | |
| from sd_dynamic_prompts.dynamic_prompting import Script as SDDPScript |
Ensure that callbacks (apart from settings and wildcards manager), only run when dynamic prompts is enabled. This builds on #648